import json
s = '{"user":"yuan","pwd":123}'

# print(s)
data = json.loads(s)

print(data, type(data))

user = data.get("user")
pwd = data.get("pwd")

user = {
    "name":"苑昊",
    "email":"123@qq.com",
    "gender":"male",
}
res = json.dumps(user)
print(res, type(res))